package com.example.jdai.jdai.util;

import android.content.Context;
import android.content.SharedPreferences;

import com.example.jdai.jdai.MyApplication;
import com.example.jdai.jdai.config.Config;

/**
 * Created by hellopyj on 2017/1/13.
 */

public class DataZx extends BaseData {
    public static String ZX="zx";
    public static String ZX_NAME=ZX+"_name";
    public static String ZX_PWD=ZX+"_pwd";
    public static String ZX_CODE=ZX+"_code";
    public static String ZX_STATUS=ZX+"_status";
    public DataZx(){
        count=3;
        SharedPreferences sp= MyApplication.applicationContext.getSharedPreferences(Config.SP_NAME, Context.CONTEXT_RESTRICTED);
        data.put(ZX_NAME,sp.getString(ZX_NAME,""));
        data.put(ZX_PWD,sp.getString(ZX_PWD,""));
        data.put(ZX_CODE,sp.getString(ZX_CODE,""));
        data.put(ZX_STATUS,sp.getString(ZX_STATUS,""));
     }
    public boolean saveAll()
    {
        super.saveAll();
        return dataCheck();
    }
}
